<template>
  <h1>欢迎</h1>
  <!-- <router-link to="/login">去登录页</router-link> -->
  <el-button type="primary" @click="goHome">去登录页</el-button>
</template>

<script setup>
import { useRouter } from "vue-router";

const router = useRouter();

// 去登录页
const goHome = () => {
  router.push("/login");
};
</script>

<style scoped></style>
